<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="单个题库统计" name="first">
        <SingleStatistics></SingleStatistics>
      </el-tab-pane>
      <el-tab-pane label="题库汇总统计" name="second">
        <SummaryStatistics ref="summaryStatistics"></SummaryStatistics>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import SingleStatistics from "./single.vue";
import SummaryStatistics from "./summary.vue";
export default {
  name: "JuanReposStatistics",
  components: { SingleStatistics, SummaryStatistics },
  data() {
    return {
      activeName: "first",
    };
  },
  created() {},
  methods: {
    handleClick(tab) {
      if(this.$refs.summaryStatistics) {
        this.$refs.summaryStatistics.doLayout()
      }
    }
  },
};
</script>
<style lang="scss" scoped>
.app-container {
}
</style>
